/*
 */

package to.pm.web.ricercaOrdine;

/*
 */
import java.util.Date;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.validator.annotations.Validation;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;
import com.opensymphony.xwork2.conversion.annotations.Conversion;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
import java.util.logging.Logger;



@Validation()
@Conversion()
public class RicercaOrdineAction extends ActionSupport  implements Preparable {
 

    private static final Logger log = Logger.getLogger(RicercaOrdineAction.class.getName());

    private Date now;
    private String name;

    @TypeConversion(converter = "to.pm.web.DateConverter")
    @RequiredFieldValidator(message = "Please enter the date")
    public void setDateNow(Date now) { this.now = now; }
    public Date getDateNow() { return now; }

    @RequiredStringValidator(message = "Please enter a name", trim = true)
    public void setName(String name) { this.name = name; }
    public String getName() { return this.name; }

    @Override
    public String execute() throws Exception {
        setName("execute");
        log.info("in execute");
        return INPUT;
    }

    public String ricercaOrdini() throws Exception {
        log.info("in ricercaOrdini");
        return INPUT;
    }

    public String doLoadForm() throws Exception {
        log.info("in loadForm");
        return INPUT;
    }

    public void prepare() throws Exception {
        setName("pippo");
        setDateNow((new Date()));
        log.info("in prepare");
    }
}
